import { ApiProperty } from "@midwayjs/swagger";

export enum MesType {
    interactive = 'interactive',
    text = 'text',
    post = 'post',
    image = 'image',
    share_chat = 'share_chat'
}

export enum FbType {
    text = 'text',
    post = 'post',
    interactive = 'interactive',
    image = 'image',
    share_chat = 'share_chat',
    share_user = 'share_user',
    audio = 'audio',
    media = 'media',
    file = 'file',
    sticker = 'sticker',
    system = 'system',
}

export enum AlmightyType {
    delete = "delete",
    deletes = "deletes",
    urgent_app = "urgent_app",
    urgent_sms = "urgent_sms",
    urgent_phone = "urgent_phone",
    pins = "pins",
    pins_remove = "pins_remove",
    reactions = "reactions",
    reactions_remove = "reactions_remove"
}

export enum OperationType {
    reply = "reply",
    update = "update"
}

export enum UserType {
    open_id = "open_id",
    user_id = "user_id",
    union_id = "union_id"
}

export enum SortType {
    ByCreateTimeAsc = "ByCreateTimeAsc",
    ByActiveTimeDesc = "ByActiveTimeDesc"
}

export class GroupMesDTO {
    @ApiProperty({
        enum: MesType
    })
    type: string;

    @ApiProperty()
    content: string;

    @ApiProperty()
    postUrl: string;
}

export class GroupQQMesDTO {
    @ApiProperty()
    receiveId;
    @ApiProperty()
    appId: string;
    @ApiProperty()
    content;
    @ApiProperty({
        enum: MesType
    })
    type;
    @ApiProperty()
    receiveType
}

export class AlmightyMesDTO {
    @ApiProperty()
    messageId: string;
    @ApiProperty({
        enum: AlmightyType
    })
    type: AlmightyType;
    @ApiProperty()
    appId: string;
    @ApiProperty({
        enum: UserType
    })
    receiveType: UserType;
    @ApiProperty()
    userIds: string[] | string;
    @ApiProperty()
    isRemove: boolean;
    @ApiProperty()
    emojiType: string;
    @ApiProperty()
    reactionId: string
}

export class OperationQQMesDTO {
    @ApiProperty()
    messageId;
    @ApiProperty()
    type;
    @ApiProperty()
    appId;
    @ApiProperty()
    content;
    @ApiProperty()
    receiveType
}
